package lab02.test11;

import static java.lang.Math.sqrt;

public class Square extends Rectangle {
    double diagonal;

    double getDiagonal(){
        return sqrt(length * length + wide * wide);
    }
    @Override
    public String printMyWay() {
        return "边长：" + length + "面积：" + area() + "周长：" + perimeter() + "对角线长度：" + getDiagonal();
    }
}
